﻿
var cam_open;
var cam_close;
var cam_takephoto;


function openCamera(data, callback) {
    cam_open = callback;
    window.external.Open_Camera(data, "openCamera_callback");
}


function openCamera_callback(json) {
    cam_open(json);
}


function closeCamera(data,callback) {
    cam_close = callback;
    window.external.Close_Camera("closeCamera_callback");

}

function closeCamera_callback(json) {
    cam_close(json);
}

function takePhoto(callback) {
    cam_takephoto = callback;
    window.external.TakePhoto_Camera("takePhoto_callback");

}

function takePhoto_callback(json) {
    cam_takephoto(json)
}

var camQR;
function scanQR(data, callback) {
    camQR = callback;
    window.external.Open_CameraQR(data, "scanQR_callback");

}

function scanQR_callback(json) {
    camQR(json);
}

function show_ca() {
    window.external.Show_Camera();
}
function hide_ca() {
    window.external.NotShow_Camera();
}





